//
//  SetUpViewController.m
//  ZCooking
//
//  Created by 韩旭 on 16/8/29.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "SetUpViewController.h"
#import "HX_Macro.h"

@interface SetUpViewController ()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UITableView *tableView;
@end

@implementation SetUpViewController
- (UITableView *)tableView {
    if (!_tableView) {
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - 64) style:0];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"table"];
    }
    return _tableView;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"table"];
    cell.backgroundColor = COLORAUTO;
    return cell;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    UIView *viewTitle = [[UIView alloc] init];
    viewTitle.HX_width = SCREEN_WIDTH;
    viewTitle.HX_height = 44;
    viewTitle.HX_x = 0;
    viewTitle.HX_y = 0;
    viewTitle.backgroundColor = [UIColor whiteColor];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, 44)];
    label.text = @"我的收藏";
    label.HX_width = [SelfSizeTools selfSizeHeightWithString:label.text height:44 Font:[UIFont systemFontOfSize:17]];
    label.centerX = viewTitle.centerX;
    [viewTitle addSubview:label];
    [self.view addSubview:self.tableView];
    [self.view addSubview:viewTitle];
}
@end